package com.zz.parkingsystem.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * PDA设备表
 * @TableName t_pda
 */
@Data
public class Pda implements Serializable {
    /**
     * PDAid
     */
    private Integer pdaId;

    /**
     * 巡查id
     */
    private Integer insId;

    /**
     * PDA编号
     */
    private String padNo;

    /**
     * PDA名称
     */
    private String pdaName;

    /**
     * PDA设备 0:在线 1：离线
     */
    private Integer pdaStatus;

    /**
     * 使用时间
     */
    private Date pdaTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Pda other = (Pda) that;
        return (this.getPdaId() == null ? other.getPdaId() == null : this.getPdaId().equals(other.getPdaId()))
            && (this.getInsId() == null ? other.getInsId() == null : this.getInsId().equals(other.getInsId()))
            && (this.getPadNo() == null ? other.getPadNo() == null : this.getPadNo().equals(other.getPadNo()))
            && (this.getPdaName() == null ? other.getPdaName() == null : this.getPdaName().equals(other.getPdaName()))
            && (this.getPdaStatus() == null ? other.getPdaStatus() == null : this.getPdaStatus().equals(other.getPdaStatus()))
            && (this.getPdaTime() == null ? other.getPdaTime() == null : this.getPdaTime().equals(other.getPdaTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPdaId() == null) ? 0 : getPdaId().hashCode());
        result = prime * result + ((getInsId() == null) ? 0 : getInsId().hashCode());
        result = prime * result + ((getPadNo() == null) ? 0 : getPadNo().hashCode());
        result = prime * result + ((getPdaName() == null) ? 0 : getPdaName().hashCode());
        result = prime * result + ((getPdaStatus() == null) ? 0 : getPdaStatus().hashCode());
        result = prime * result + ((getPdaTime() == null) ? 0 : getPdaTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", pdaId=").append(pdaId);
        sb.append(", insId=").append(insId);
        sb.append(", padNo=").append(padNo);
        sb.append(", pdaName=").append(pdaName);
        sb.append(", pdaStatus=").append(pdaStatus);
        sb.append(", pdaTime=").append(pdaTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}